package org.lisa.crm.common.util;

import javax.servlet.http.HttpServletResponse;

import javax.servlet.http.HttpSession;

/**
 * Created by admin on 2018/1/7.
 */
public class VerificationLoginUtil {

    public static final String SESSION_ID="session-id";

    private VerificationLoginUtil(){}

    public synchronized static void  ULoginTools(HttpServletResponse response, HttpSession session, String json){
        String sessionId=GeneratePrimaryKeyStrategy.authCustomerCode();
        // 存放 用户信息
        session.setAttribute(sessionId,json);
        //// 将令牌 存到
        CookieUtil.addCookie(response,SESSION_ID,sessionId,30*60);
    }
}
